
<?php
if (!defined('APP_PATH')) {
	define('APP_PATH', $_SERVER['DOCUMENT_ROOT']."/bdACPA");
}
require_once(APP_PATH.'/required.php');
$message = null;
$CNV = new CNV();
$CNV->idpuce = intval($_REQUEST['idpuce']);
$CNV->chromosome = intval($_REQUEST['chromosome']);
$CNV->positiondebut = intval($_REQUEST['positiondebut']);
$CNV->positionfin = intval($_REQUEST['positionfin']);
$CNV->log2ratio = doubleval($_REQUEST['log2ratio']);
$CNV->nbcopie = intval($_REQUEST['nbcopie']);
//$CNV->nb_marqueurs = str_replace ( "\"" , "" , trim($elements[$titres["#Probes"]]));
$CNV->sondedebut = $_REQUEST['sondedebut'];
$CNV->sondefin = $_REQUEST['sondefin'];
$CNV->classification = intval($_REQUEST['classification']);
$CNV->herite = intval($_REQUEST['herite']);
$CNV->commentaire = $_REQUEST['commentaire'];
$CNV->methodeverification = intval($_REQUEST['methode']);
$CNV->verifie = intval($_REQUEST['verifie']);
$CNV->idcnv = intval($_REQUEST['idcnv']);

if ($_REQUEST['idcnv'] == null || $_REQUEST['idcnv'] == 0){
	$result = $CNV_DAO->ajouter_cnv($CNV);
} else {
	$result = $CNV_DAO->modifier_cnv($CNV);
}
unset($CNV);

echo $result;

?>

